﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ViewRss.aspx.cs" Inherits="WebRSSBuilder.ASP.ViewRss" ValidateRequest="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server" >

 
<script type="text/javascript">
    function ViewSave() {
        document.getElementById("SaveDivID").style.display = "block"; 
    }
   
</script>
    <style type="text/css">
        .style5
        {
            height: 21px;
        }
        .style17
        {
            height: 220px;
        }
    .style20
    {
        width: 280px;
        height: 589px;
    }
    .style21
    {
        height: 589px;
    }
        .style4
        {
            width: 91px;
            height: 21px;
        }
        .SaveDiv
        {
          display:none;
          border: 1px solid #BFCBD6; 
                    
        }
        
        .ButtonSave
        {
            background-color:#BFCBD6; 
            color:#465C71; 
            width:100px; 
            height:25px;
        }
        .style22
        {
            width: 532px;
        }
        .style23
        {
            width: 551px;
        }
        .style24
        {
            height: 38px;
        }
        .TextBoxTop
        {
            vertical-align:top; 
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
                                          <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                                        </asp:ToolkitScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
    <ProgressTemplate>
    <DIV id="IMGDIV" align="center" valign="middle" runat="server" style="position: absolute;left: 50%;top: 50%;visibility:visible;vertical-align:middle;background-color:White">
                      <asp:Image ID="Image1" runat="server" ImageUrl="~/images/wait.gif" />
</DIV>
    </ProgressTemplate>
    </asp:UpdateProgress>
    <div id="SaveDivID" class="SaveDiv">
        <table style="width:100%;">
            <tr>
                <td class="style23" style="text-align: right">
        <asp:Button ID="ButtonSave" runat="server" Text="Save" class="ButtonSave" 
                        onclick="ButtonSave_Click" />
                </td>
                <td class="style22">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="ButtonCancel" runat="server" Text="Cancel" class="ButtonSave" 
                        onclick="ButtonCancel_Click"/>

                </td>
            </tr>
        </table>

    </div>
    <table style="width:100%;">
    <tr>
         <td class="style20" valign="top">
                <table style="width:100%;">

                    <tr>
                        <td class="style3" colspan="2">
                            <asp:Label ID="LabelFeedTitle" runat="server" Font-Bold="True" 
                                Font-Size="Larger" Text="Feed Properties"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="LabelTitle" runat="server" Text="Title"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxTitle" runat="server" Width="200px" onchange="ViewSave()"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="LabelURL" runat="server" Text="Website URL"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxURL" runat="server" Width="200px" onchange="ViewSave()"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="LabelCopyright" runat="server" Text="Copyright"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxCopyright" runat="server" Height="22px" Width="198px" onchange="ViewSave()"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="LabelLanguage" runat="server" Text="Language"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxLanguage" runat="server" Height="22px" Width="198px" onchange="ViewSave()"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="LabelEditor" runat="server" Text="Editor"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxEditor" runat="server" Height="22px" Width="197px" onchange="ViewSave()"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="LabelWebMaster" runat="server" Text="Webmaster"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxWebMaster" runat="server" Height="22px" Width="197px" onchange="ViewSave()"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style4">
                            <asp:Label ID="LabelDescription" runat="server" Text="Description"></asp:Label>
                        </td>
                        <td class="style5">
                            <asp:TextBox ID="TextBoxDescription" runat="server" Height="93px" Width="198px" 
                                TextMode="MultiLine" onchange="ViewSave()"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="LabelSubject" runat="server" Text="Subject"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxSubject" runat="server" Height="22px" Width="200px" onchange="ViewSave()"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="Label9" runat="server" Text="Publish Date"></asp:Label>
                        </td>
                        <td valign="bottom">
                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                <ContentTemplate>
                                    <asp:TextBox ID="TextBoxPubDate" runat="server" Height="16px" Width="157px" 
                                        CssClass="TextBoxTop" onchange="ViewSave()"></asp:TextBox>
                                    <asp:CalendarExtender ID="TextBoxPubDate_CalendarExtender" runat="server" popupbuttonid="PubDateImage"
                                        TargetControlID="TextBoxPubDate" Format="dddd MMMM d, yyyy" 
                                      >
                                    </asp:CalendarExtender>
                                    <img id="PubDateImage" src="/images/calender.gif" alt="Choose Date"/>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style24">
                            <asp:Label ID="Label10" runat="server" Text="Last Build Date"></asp:Label>
                        </td>
                        <td valign="top" class="style24">
                            <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                <ContentTemplate>
                                    <asp:TextBox ID="TextBoxLastBuild" runat="server" Height="16px" Width="157px" 
                                        CssClass="TextBoxTop" onchange="ViewSave()"></asp:TextBox>
                                    <asp:CalendarExtender ID="TextBoxLastBuild_CalendarExtender" runat="server"  
                                        TargetControlID="TextBoxLastBuild" Format="dddd MMMM d, yyyy" 
                                        PopupButtonID="LastBuildDateImage" >
                                    </asp:CalendarExtender>
                                    <img id="LastBuildDateImage" src="/images/calender.gif"   alt="Choose Date"/>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3" colspan="2">
                                        <asp:Label ID="LabelImageTitle" runat="server" Font-Bold="True" 
                                            Font-Size="Larger" Text="Image"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                                        <asp:Label ID="LabelImageURL" runat="server" Text="ImageURL"></asp:Label>
                        </td>
                        <td valign="top">
                                        <asp:TextBox ID="TextBoxImageURL" runat="server" Width="208px" onchange="ViewSave()"></asp:TextBox>
                                    </td>
                    </tr>
                    <tr>
                        <td class="style3">
                                        <asp:Label ID="LabelWidth" runat="server" Text="Width"></asp:Label>
                        </td>
                        <td valign="top">
                                        <asp:TextBox ID="TextBoxWidth" runat="server" Width="208px" onchange="ViewSave()"></asp:TextBox>
                                    </td>
                    </tr>
                    <tr>
                        <td class="style3">
                                        <asp:Label ID="LabelHeight" runat="server" Text="Height"></asp:Label>
                        </td>
                        <td valign="top">
                                        <asp:TextBox ID="TextBoxHeight" runat="server" Width="208px" onchange="ViewSave()"></asp:TextBox>
                                    </td>
                    </tr>
                    <tr>
                        <td class="style3" colspan="2">
                                        <asp:Label ID="LabelStyleSheetTitle" runat="server" Font-Bold="True" 
                                            Font-Size="Larger" Text="StyleSheet"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                                        <asp:Label ID="LabelType" runat="server" Text="Type"></asp:Label>
                        </td>
                        <td valign="top">
                                        <asp:DropDownList ID="DropDownListType" runat="server" Height="22px" 
                                            Width="207px" onchange="ViewSave()">
                                            <asp:ListItem>text/xsl</asp:ListItem>
                                            <asp:ListItem>text/css</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                    </tr>
                    <tr>
                        <td class="style3">
                                        <asp:Label ID="LabelLink" runat="server" Text="Link"></asp:Label>
                        </td>
                        <td valign="top">
                                        <asp:TextBox ID="TextBoxLink" runat="server" Width="208px"  onchange="ViewSave()"></asp:TextBox>
                                    </td>
                    </tr>
                </table>
            </td>
            <td valign="top" class="style21">
                <table style="width: 100%; height: 693px; margin-top: 0px;">
                    <tr>
                        <td valign="top">
                            <table style="width: 100%; height: 554px;">
                                <tr>
                                    <td class="style17" valign="top">
                                        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
                                            SelectMethod="GetItem" TypeName="WebRSSBuilder.Core.RSSObjectDataProvider" 
                                            DataObjectTypeName="WebRSSBuilder.Core.RSSItem" DeleteMethod="deleteItem" 
                                            InsertMethod="Add" UpdateMethod="Update" 
                                                    onobjectcreating="ObjectDataSource2_ObjectCreating" 
                                            ViewStateMode="Enabled" ondeleted="ObjectDataSource2_Deleted" 
                                            ondeleting="ObjectDataSource2_Deleting" oninserted="ObjectDataSource2_Inserted" 
                                            oninserting="ObjectDataSource2_Inserting" onupdated="ObjectDataSource2_Updated" 
                                            onupdating="ObjectDataSource2_Updating">
                                            <SelectParameters>
                                                <asp:ControlParameter ControlID="GridView2"  Name="id" 
                                                    PropertyName="SelectedDataKey.Value" Type="String" />
                                            </SelectParameters>
                                        </asp:ObjectDataSource>
                                        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                                            SelectMethod="GetAllItems" TypeName="WebRSSBuilder.Core.RSSObjectDataProvider" 
                                                    onobjectcreating="ObjectDataSource1_ObjectCreating" 
                                            ViewStateMode="Enabled">
                                           
                                        </asp:ObjectDataSource>

                                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                            <ContentTemplate>
                                                <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
                                                    AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Title" 
                                                    DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None" 
                                                    PageSize="5" Width="634px">
                                                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                    <Columns>
                                                        <asp:CommandField ShowSelectButton="True" />
                                                        <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                                                        <asp:BoundField DataField="PubDate" HeaderText="PubDate" 
                                                            SortExpression="PubDate" />
                                                    </Columns>
                                                    <EditRowStyle BackColor="#999999" />
                                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                                </asp:GridView>
                                                <br />
                                                <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                                                    BackColor="White" BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" 
                                                    CellPadding="4" DataKeyNames="Title" DataSourceID="ObjectDataSource2" 
                                                    GridLines="Horizontal" Height="50px" Width="670px">
                                                    <EditRowStyle BackColor="White" Font-Bold="True" ForeColor="Black" />
                                                    <Fields>
                                                        <asp:CommandField ShowInsertButton="True" ShowEditButton="True"  ShowDeleteButton="True" 
                                                             EditImageUrl="images/edit.gif" DeleteImageUrl="images/delete.gif"   ButtonType="Link" CancelImageUrl="images/cancelB.gif" UpdateImageUrl="images/update.gif" />
                                                        <asp:TemplateField HeaderText="Title" SortExpression="Title">
                                                            <EditItemTemplate>
                                                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                                                            </EditItemTemplate>
                                                            <InsertItemTemplate>
                                                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Title") %>'></asp:TextBox>
                                                            </InsertItemTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Title") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <ControlStyle Width="400px" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="Link" HeaderText="Link" SortExpression="Link">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="GUID" HeaderText="GUID" SortExpression="GUID">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                        <asp:CheckBoxField DataField="IsPermaLink" HeaderText="IsPermaLink" 
                                                            SortExpression="IsPermaLink" />
                                                        <asp:BoundField DataField="Category" HeaderText="Category" 
                                                            SortExpression="Category">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                        <asp:TemplateField HeaderText="Description">
                                                            <ItemTemplate>
                                                                <asp:Label ID="DescriptionLabel" Runat="Server" 
                                                                    Text='<%# Eval("Description") %>' />
                                                            </ItemTemplate>
                                                            <InsertItemTemplate>
                                                                    <cc1:Editor ID="InsertDescription" runat="server" Height="400px" Content='<%# Bind("Description") %>' ActiveMode="Design" />
                                                            </InsertItemTemplate>
                                                            <EditItemTemplate>
                                                                 <cc1:Editor ID="EditDescription" runat="server" Height="400px" Content='<%# Bind("Description") %>' />
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                       <asp:TemplateField HeaderText="PubDate">
                                                            <ItemTemplate>
                                                                <asp:Label ID="PubDateLabel" Runat="Server" 
                                                                    Text='<%# Eval("PubDate") %>' />
                                                            </ItemTemplate>
                                                            <InsertItemTemplate>
                                                                   <asp:TextBox ID="InsertPubDate" runat="server" Text='<%# Bind("PubDate") %>' CssClass="TextBoxTop"/>
                                                                   <asp:CalendarExtender ID="CalendarExtenderInsert" TargetControlID="InsertPubDate" runat="server" Format="dddd MMMM d, yyyy" PopupButtonID="LastBuildDateImageInsert"></asp:CalendarExtender>
                                                                    <img id="LastBuildDateImageInsert" src="/images/calender.gif"   alt="Choose Date"/>
                                                            </InsertItemTemplate>
                                                            <EditItemTemplate>
                                                                 <asp:TextBox ID="EditPubDate" runat="server"  Text='<%# Bind("PubDate") %>' CssClass="TextBoxTop"/>
                                                                  <asp:CalendarExtender ID="CalendarExtenderEdit" TargetControlID="EditPubDate" runat="server" Format="dddd MMMM d, yyyy" PopupButtonID="LastBuildDateImageUpdate"></asp:CalendarExtender>
                                                                   <img id="LastBuildDateImageUpdate" src="/images/calender.gif"   alt="Choose Date"/>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="TimeOffset" HeaderText="TimeOffset" 
                                                            SortExpression="TimeOffset">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="Author" HeaderText="Author" SortExpression="Author">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="Comments" HeaderText="Comments" 
                                                            SortExpression="Comments">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="EnclosureUrl" HeaderText="EnclosureUrl" 
                                                            SortExpression="EnclosureUrl">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="EnclosureLength" HeaderText="EnclosureLength" 
                                                            SortExpression="EnclosureLength">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="EnclosureType" HeaderText="EnclosureType" 
                                                            SortExpression="EnclosureType">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="Valid" HeaderText="Valid" SortExpression="Valid">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="Identifier" HeaderText="Identifier" 
                                                            SortExpression="Identifier">
                                                        <ControlStyle Width="400px" />
                                                        </asp:BoundField>
                                                    </Fields>
                                                    <FooterStyle BackColor="White" ForeColor="#333333" />
                                                    <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
                                                    <InsertRowStyle BackColor="White" ForeColor="Black" />
                                                    <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
                                                    <RowStyle BackColor="White" ForeColor="Black" />
                                                </asp:DetailsView>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                        <br />
                                        <br />
                                    </td>
                                </tr>
                                </table>
                             
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        
        
    </table>
</asp:Content>
